package com.emily.test.service.impl;

import com.emily.test.mapper.TUserRoleMapper;
import com.emily.test.service.TUserRoleService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.Map;

@Service("tUserRoleServiceAgent")
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT,timeout=36000,rollbackFor=Exception.class)
public class TUserRoleServiceImpl implements TUserRoleService {

    @Resource
    private TUserRoleMapper tUserRoleMapper;

    @Override
    public int insertTUserRoleInfo(Map<String, Object> map) {
        return tUserRoleMapper.insertTUserRoleInfo(map);
    }

    @Override
    public int deleteUserRoleByUserId(Integer userId) {
        return tUserRoleMapper.deleteUserRoleByUserId(userId);
    }
}
